feat: traceroute support for WireGuard and Tailscale tunnels#4108
Open
xdqi wants to merge 3 commits intoSagerNet:testingfrom
Open
feat: traceroute support for WireGuard and Tailscale tunnels#4108xdqi wants to merge 3 commits intoSagerNet:testingfrom
xdqi wants to merge 3 commits intoSagerNet:testingfrom
Conversation
Add UDP and TCP DirectRoute handling to enable mtr --udp and mtr --tcp through WireGuard and other tunnels. - Add UDP DirectRoute with ICMPForwarder integration in direct outbound - Add TCP DirectRoute for traceroute in route matching - Pass ICMPForwarder to UDP/TCP forwarders in WireGuard stack - Fix safe type assertion for DirectRouteOutbound in PreMatch - Intercept ICMP errors in stackDevice before gVisor delivery - Use import aliases for sing-tun packages
Add max_traceroute_hop_limit configuration for TUN inbound and enable ICMP TTL decrement on WireGuard and Tailscale endpoints for VPN server mode. - Add MaxTracerouteHopLimit option to TUN inbound configuration - Pass local addresses to DirectRoute wrapper for TTL decrement - Use DirectRoute wrapper for WireGuard and Tailscale stacks - Enable ICMP TTL decrement on WG and Tailscale servers
1b75d75 to
056c45c
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Add traceroute/mtr support for WireGuard and Tailscale TUN tunnels, enabling ICMP, UDP and TCP traceroute modes to work through proxy tunnels.
Features
max_traceroute_hop_limitoption to TUN inbound configurationdecrement_ttloption for DirectRoute behaviorDependencies
Changes
transport/wireguard/: DirectRoute integration in device_stack and device_natprotocol/direct/outbound.go: Pass TTL to direct outbound connectionsprotocol/group/: Selector and URLTest DirectRoute propagationprotocol/tun/inbound.go: Configurable max traceroute hop limitoption/tun.go: New TUN option fieldsroute/route.go: DirectRoute connection handling